//
//  AllTableViewCell.m
//  kr_36
//
//  Created by lmt on 16/1/19.
//  Copyright © 2016年 www.lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "AllTableViewCell.h"

@implementation AllTableViewCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)dealloc
{
    [_touxiang release];
    [_name release];
    [_title release];
    [_columName release];
    [_tu release];
    [_shu release];
    [_time release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.touxiang = [[UIImageView alloc] init];
//        _touxiang.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_touxiang];
        [_touxiang release];
        
        self.name = [[UILabel alloc] init];
        //_name.backgroundColor = [UIColor yellowColor];
        [self.contentView addSubview:_name];
        _name.font = [UIFont systemFontOfSize:12];
        [_name release];
        
        self.title = [[UILabel alloc] init];
        //_title.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_title];
        _title.font = [UIFont systemFontOfSize:14];
        _title.textAlignment = NSTextAlignmentJustified;
        [_title release];
        
        self.columName = [[UILabel alloc] init];
        //_columName.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_columName];
        _columName.font = [UIFont systemFontOfSize:12];
        _columName.textAlignment = NSTextAlignmentRight;
        [_columName release];
        
        self.tu = [[UIImageView alloc] init];
        //_tu.backgroundColor = [UIColor blueColor];
        [self.contentView addSubview:_tu];
        [_tu release];
        
        self.shu = [[UIView alloc] init];
        _shu.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:_shu];
        [_shu release];
        
        self.time = [[UILabel alloc] init];
        //_time.backgroundColor = [UIColor purpleColor];
        [self.contentView addSubview:_time];
        _time.font = [UIFont systemFontOfSize:14];
        [_time release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    
    _touxiang.frame = CGRectMake(5, 5, 30, 30);
    _touxiang.layer.cornerRadius = 15;
    _touxiang.clipsToBounds = YES;
    
    _name.frame = CGRectMake(40, 10, 50, 20);
    _name.center = CGPointMake(_name.center.x, _touxiang.center.y);
    
    _time.frame = CGRectMake(95, 10, 70, 20);
    _time.center = CGPointMake(_time.center.x, _touxiang.center.y);
    
    _shu.frame = CGRectMake(self.contentView.frame.size.width - 5, 5, 2, 20);
    _shu.center = CGPointMake(_shu.center.x, _touxiang.center.y);
    
    _columName.frame = CGRectMake(self.contentView.frame.size.width - 68, 5, 60, 20);
    _columName.center = CGPointMake(_columName.center.x, _touxiang.center.y);
    
    _title.frame = CGRectMake(5, 45, self.contentView.frame.size.width - 125 - 10 - 5, 100);
    _title.numberOfLines = 0;
    
    _tu.frame = CGRectMake(self.contentView.frame.size.width - 125, 45, 120, 100);
    
    
}



- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
